<?php
/**
 * SocialEngine
 *
 * @category   Application_Extensions
 * @package    Vote
 * @copyright  Copyright KEENONWEB LLC
 * @license    http://www.keenonweb.com/
 * @version    $Id: Participate.php 2011-03-09 08:45:41Z idris $
 * @author     Idris
 */

/**
 * @category   Application_Extensions
 * @package    Vote
 * @copyright  Copyright KEENONWEB LLC
 * @license    http://www.keenonweb.com/
 */

class Vote_Form_Participate extends Engine_Form {
	public function init() {
		
		$this->addElement ( 'Text', 'title', array ('label' => 'vote_photo_part_Title', 'allowEmpty' => false, 'required' => true, 'validators' => array (array ('NotEmpty', true ), array ('StringLength', false, array (1, 64 ) ) ), 'filters' => array ('StripTags', new Engine_Filter_Censor (), new Engine_Filter_EnableLinks () ) ) );
		
		$this->addElement ( 'Textarea', 'description', array ('label' => 'vote_photo_part_Description', 'filters' => array (new Engine_Filter_Censor (), new Engine_Filter_Html ( array ('AllowedTags' => '' ) ) ) ) );
		
		$this->addElement ( 'Hidden', 'task', array ('value' => 'participate' ) );
		
		$this->addElement ( 'File', 'photo', array ('label' => 'vote_part_Photo' ) );
		
		$this->photo->addValidator ( 'Extension', false, 'jpg,png,gif,bmp' );
		
		$this->addElement ( 'Button', 'submit', array ('label' => 'vote_photo_part_Participate', 'type' => 'submit', 'ignore' => true, 'order' => 99999, 'decorators' => array ('ViewHelper' ) ) );
		
		$this->addElement ( 'Cancel', 'cancel', array ('label' => 'vote_photo_part_cancel', 'link' => true, 'prependText' => ' or ', 'order' => 999999, 'decorators' => array ('ViewHelper' ) ) );
		
		$this->addDisplayGroup ( array ('submit', 'cancel' ), 'buttons', array ('decorators' => array ('FormElements', 'DivDivDivWrapper' ), 'order' => 999999 ) );
	
	}
}